﻿/********************** File Header *****************\
File Name : <SuggestWord>
Project Name : <SpellChecker.net>
Author : <Mobwiz>
Description : The suggested word returned by the checker
Change log :
------------------------------------------------
#1 2012-6-21 Mobwiz | Create the file.
#2 

**/

namespace Mobwiz.SpellChecker.Core
{
    public class SuggestedWord
    {
        private string _word;
        private int _distance;

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="word"></param>
        /// <param name="distance"></param>
        public SuggestedWord(string word, int distance)
        {
            _word = word;
            if (distance >= 0)
                _distance = distance;
            else
                _distance = 0;
        }

        /// <summary>
        /// Word content
        /// </summary>
        public string Word
        {
            get
            {
                if (_word != null)
                    return _word;
                else
                    return "";
            }
        }

        /// <summary>
        /// Edit distance
        /// </summary>
        public int EditDistance
        {
            get
            {
                return _distance;
            }
        }
    } 
}
